home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume25 / QBATCH / part01 next >
Encoding:
Text File  |  1991-11-04  |  59.7 KB  |  2,284 lines

  1. Newsgroups: comp.sources.misc
  2. From: alan@tharr (Alan Saunders)
  3. Subject:  v25i020:  QBATCH - a queued batch processing system for UNIX, Part01/06
  4. Message-ID: <csm-v25i020=QBATCH.214249@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: dbf4aafb132a8f7a0a9dea0bed6653c1
  6. Date: Tue, 5 Nov 1991 03:44:39 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: alan@tharr (Alan Saunders)
  10. Posting-number: Volume 25, Issue 20
  11. Archive-name: QBATCH/part01
  12. Environment: UNIX
  13.  
  14. QBATCH is a versatile, configurable queued batch processing system for
  15. *NIX.
  16.  
  17. Using it, instead of batch or simply '&' the batch workload on a system
  18. can be tuned to provide optimum throughput.  For more detailed informa-
  19. tion see the DESCRIPTION file, and the docs.
  20.  
  21. QBATCH was posted earlier in the year to alt.sources. In response to
  22. mail from people trying to port it, I have completely revamped it in
  23. terms of it's configurability, and rewritten the documentation.  
  24.  
  25. Enjoy...
  26.  
  27.    Alan
  28. ------------
  29. #! /bin/sh
  30. # This is a shell archive.  Remove anything before this line, then unpack
  31. # it by saving it into a file and typing "sh file".  To overwrite existing
  32. # files, type "sh file -c".  You can also feed this as standard input via
  33. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  34. # will see the following message at the end:
  35. #        "End of archive 1 (of 6)."
  36. # Contents:  MANIFEST README doc doc/Index magic man man/jj.l man/jk.l
  37. #   man/jm.l man/jn.l man/jobdone.l man/jr.l man/lman man/qa.l
  38. #   man/qd.l man/qe.l man/qg.l man/qh.l man/ql.l man/qp.l man/qs.l
  39. #   man/qw.l man/qxenv.l man/rc.QBATCH.l src src/jdgen src/jr.c
  40. #   src/patchlevel.h src/qagen src/qd.c src/qe.c src/qg.c src/qh.c
  41. #   src/qw.c src/rcgen src/what.h src/whatgen
  42. # Wrapped by root@vfib_d on Thu Oct 31 15:46:39 1991
  43. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  44. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  45.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  46. else
  47. echo shar: Extracting \"'MANIFEST'\" \(2656 characters\)
  48. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  49. X   File Name        Archive #    Description
  50. X-----------------------------------------------------------
  51. X DESCRIPTION                3    Outline description (sales blurb)
  52. X INSTALL                    3    Installation notes and bewares
  53. X MANIFEST                   1    This shipping list
  54. X NEWS                       4    Update history
  55. X NOTICE                     2    Copyright/disclaimer YOU MUST READ THIS!
  56. X README                     1    Guess what?
  57. X doc                        1    
  58. X doc/Index                  1    Index to documentation
  59. X doc/chap.01                2    
  60. X doc/chap.02                3    
  61. X doc/chap.03                2    
  62. X doc/chap.04                5    
  63. X doc/chap.05                4    
  64. X doc/chap.06                4    
  65. X doc/chap.07                3    
  66. X doc/chap.08                3    
  67. X doc/chap.09                3    
  68. X doc/glossary               2    Limited glossary of terms used
  69. X magic                      1    
  70. X man                        1    
  71. X man/jj.l                   1    [nt]roff source man pages
  72. X man/jk.l                   1    
  73. X man/jm.l                   1    
  74. X man/jn.l                   1    
  75. X man/jobdone.l              1    
  76. X man/jr.l                   1    
  77. X man/js.l                   2    
  78. X man/lman                   1    script to make a readable doc from man page
  79. X man/qa.l                   1    
  80. X man/qbatch.l               3    
  81. X man/qc.l                   4    
  82. X man/qd.l                   1    
  83. X man/qe.l                   1    
  84. X man/qf.l                   2    
  85. X man/qg.l                   1    
  86. X man/qh.l                   1    
  87. X man/ql.l                   1    
  88. X man/qp.l                   1    
  89. X man/qs.l                   1    
  90. X man/qt.l                   2    
  91. X man/queue.l                2    
  92. X man/qw.l                   1    
  93. X man/qxenv.l                1    
  94. X man/rc.QBATCH.l            1    
  95. X src                        1    Sources and Makefile for QBATCH
  96. X src/Makefile               3    
  97. X src/config.c               4    
  98. X src/config.h               4    
  99. X src/jdgen                  1    
  100. X src/jj.c                   4    
  101. X src/jk.c                   5    
  102. X src/jm.c                   2    
  103. X src/jn.c                   2    
  104. X src/jr.c                   1    
  105. X src/js.c                   5    
  106. X src/patchlevel.h           1    
  107. X src/qagen                  1    
  108. X src/qbatch.h               2    
  109. X src/qc.c                   3    
  110. X src/qd.c                   1    
  111. X src/qe.c                   1    
  112. X src/qf.c                   5    
  113. X src/qg.c                   1    
  114. X src/qh.c                   1    
  115. X src/ql.c                   3    
  116. X src/qp.c                   6    
  117. X src/qs.c                   2    
  118. X src/qt.c                   2    
  119. X src/qw.c                   1    
  120. X src/rcgen                  1    
  121. X src/time.c                 2    
  122. X src/what.h                 1    
  123. X src/whatgen                1    
  124. END_OF_FILE
  125. if test 2656 -ne `wc -c <'MANIFEST'`; then
  126.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  127. fi
  128. # end of 'MANIFEST'
  129. fi
  130. if test -f 'README' -a "${1}" != "-c" ; then 
  131.   echo shar: Will not clobber existing file \"'README'\"
  132. else
  133. echo shar: Extracting \"'README'\" \(3100 characters\)
  134. sed "s/^X//" >'README' <<'END_OF_FILE'
  135. X    QBATCH .. a queued batch processing system for UNIX
  136. X
  137. X    The QBATCH system and its related programs were
  138. X    written by Alan D. Saunders and are
  139. X    Copyright (c) Vita Services Ltd. 1990 and
  140. X    Copyright (c) Vita Fibres Ltd. 1991
  141. X
  142. X    PLEASE read the NOTICE file for details.
  143. X
  144. QBATCH was written to overcome the limitations of the UNIX at and batch
  145. commands where there is a need for potentially several job queues
  146. containing jobs to be processed in a specific order. On some versions
  147. of UNIX, it is possible to gain this effect by utilising the print
  148. spooling system. QBATCH provides a portable, consistent method of
  149. achieving this object on all flavours of UNIX (I hope).
  150. X
  151. XFor details of what QBATCH is, and the related programs, please read
  152. the DESCRIPTION file and the documents in the doc directory.
  153. Corresponding man pages are available in the man directory. The
  154. X'qbatch' document (and man page) gives an overview of QBATCH, and a
  155. brief description of the programs and files involved. Each is described
  156. in more detail in a separate document (and man page).
  157. X
  158. XFor details of the terms and conditions for the use and distribution of
  159. QBATCH please read the NOTICE file which accompanies this
  160. distribution.  NOTE: You are bound to read and accept the contents of
  161. this NOTICE file as a condition of the right to distribute, port and
  162. use QBATCH.
  163. X
  164. My only access to the net is through tharr PUBLIC access to Unix and it
  165. is through their courtesy and generosity that QBATCH may be distributed
  166. to you.
  167. X
  168. QBATCH is my first posting to the net at large, and as it was
  169. originally written for my own purposes, it may be found to be a little
  170. X'raw', If so I apologise and ask you to bear with me and (gently)
  171. correct me in my ways. -- Alan
  172. X
  173. QBATCH was originally written on a SUN SPARCstation under SunOS 4.03,
  174. and has migrated through SunOS 4.1. It is now running in live systems
  175. under SunOS 4.1 and 4.1.1 on SPARCstation and SPARCserver 4/330's. It
  176. was written as far as possible using X-OPEN (tm) guidelines according
  177. to XPG3, and using SunOS's system V programming environment. I don't
  178. therefore expect too many major problems porting it to other
  179. environments.
  180. X
  181. I wrote QBATCH to suit my own requirements under SunOS, and having no
  182. access to other environments or architectures, have made no provision
  183. in configuration files, sources or makefiles, for porting to other
  184. environments or architectures.
  185. X
  186. X30 Aug 1991 .. Latest version has a degree of configuration for
  187. X           different platforms.  see NEWS for details.
  188. X
  189. Please therefore feel free to make such configuration modifications as
  190. you feel necessary to get it to work in your environment, but please
  191. also make sure I get a copy of all changes so that I can include them
  192. in the distribution for the benefit of others.
  193. X
  194. The programs may be installed in any directory accessible through the
  195. PATH environment variable. They will be installed by the Makefile in
  196. the defined BINDIR.
  197. X
  198. X
  199. XEnjoy ... Alan Saunders (July 23 1991)
  200. X            (Aug 30 1991)
  201. I may be contacted at home (Snail mail)
  202. X
  203. X1341 Rochdale Road, Blackley, Manchester, M9 2FG, United Kingdom.
  204. X
  205. or alan@tharr.uucp
  206. END_OF_FILE
  207. if test 3100 -ne `wc -c <'README'`; then
  208.     echo shar: \"'README'\" unpacked with wrong size!
  209. fi
  210. # end of 'README'
  211. fi
  212. if test ! -d 'doc' ; then
  213.     echo shar: Creating directory \"'doc'\"
  214.     mkdir 'doc'
  215. fi
  216. if test -f 'doc/Index' -a "${1}" != "-c" ; then 
  217.   echo shar: Will not clobber existing file \"'doc/Index'\"
  218. else
  219. echo shar: Extracting \"'doc/Index'\" \(843 characters\)
  220. sed "s/^X//" >'doc/Index' <<'END_OF_FILE'
  221. X
  222. X             QBATCH  a queued batch processing system for UNIX
  223. X
  224. X
  225. X         The QBATCH system and its related programs were
  226. X         written by Alan D. Saunders and are
  227. X         Copyright (c) Vita Services Ltd. 1990 and
  228. X         Copyright (c) Vita Fibres Ltd. 1991
  229. X
  230. CHAPTER INDEX:
  231. X
  232. chap.01    INTRODUCTION    Description of queued batch processing, and QBATCH.
  233. X
  234. chap.02    DESCRIPTION     Outline description of how QBATCH works.
  235. X
  236. chap.03    ADMINISTRATION    Commands available only to the super user.
  237. X
  238. chap.04    USER        Commands anyone can use.
  239. X
  240. chap.05    MONITORS     What they are, and how to configure and use them.
  241. X
  242. chap.06    CONFIGURATION    What needs to be done to install a working QBATCH.
  243. X
  244. chap.07    TUNING        How to get the best out of QBATCH.
  245. X
  246. chap.08 FIXED        Fixed context, What it means, and how to use it.
  247. X
  248. chap.09    SECURITY    Notes and comments about system security and QBATCH.
  249. END_OF_FILE
  250. if test 843 -ne `wc -c <'doc/Index'`; then
  251.     echo shar: \"'doc/Index'\" unpacked with wrong size!
  252. fi
  253. # end of 'doc/Index'
  254. fi
  255. if test -f 'magic' -a "${1}" != "-c" ; then 
  256.   echo shar: Will not clobber existing file \"'magic'\"
  257. else
  258. echo shar: Extracting \"'magic'\" \(37 characters\)
  259. sed "s/^X//" >'magic' <<'END_OF_FILE'
  260. X0    string        qBq            QBATCH queue file
  261. END_OF_FILE
  262. if test 37 -ne `wc -c <'magic'`; then
  263.     echo shar: \"'magic'\" unpacked with wrong size!
  264. fi
  265. # end of 'magic'
  266. fi
  267. if test ! -d 'man' ; then
  268.     echo shar: Creating directory \"'man'\"
  269.     mkdir 'man'
  270. fi
  271. if test -f 'man/jj.l' -a "${1}" != "-c" ; then 
  272.   echo shar: Will not clobber existing file \"'man/jj.l'\"
  273. else
  274. echo shar: Extracting \"'man/jj.l'\" \(2017 characters\)
  275. sed "s/^X//" >'man/jj.l' <<'END_OF_FILE'
  276. X.TH JJ 1L "14 May 1991" JJ "QUEUED BATCH PROCESSING SYSTEM"
  277. X.SH COPYRIGHT
  278. The
  279. X.B QBATCH
  280. system and its related programs are Copyright:
  281. X.br
  282. X(c) Vita Services Ltd. 1990
  283. X.br
  284. X(c) Vita Fibres Ltd. 1991
  285. X.SH NAME 
  286. X.B jj
  287. X\- Job jump. move an entry towards the front of the queue.
  288. X.SH SYNOPSIS
  289. X.B jj
  290. X[
  291. X.BI \-e " entryno"
  292. X]
  293. X.B qname
  294. X|[
  295. X.BI \-v
  296. X]
  297. X.SH DESCRIPTION
  298. The queue is searched for an the specified entry.
  299. If the user owns that entry (i.e the uid of 
  300. the user attempting to jump a job is either the same 
  301. as that of the user who originally submitted it, or is 
  302. that of the super user), the job may be moved. If the
  303. previous job in the queue is also owned by this user,
  304. the positions of the two jobs in the queue will be
  305. swapped. This is repeated until the previous job in
  306. the queue is NOT owned by this user. If the queue is 
  307. active and a job is currently being processed, the 
  308. job being moved cannot jump above the active job.
  309. otherwise, in an idle queue, and subject to 
  310. ownership restrictions, a job may be moved to the
  311. top of the queue.
  312. X.br
  313. The super user may jump any job to the top of an
  314. idle queue, or to second in an active queue.
  315. X.br
  316. An ordinary user may only jump a job to the front
  317. of a consecutive group of his or her own jobs. (i.e. may not jump a job above one
  318. owned by another user.)
  319. X.br
  320. In a fixed context queue, where the uid of a submitted job has
  321. been changed, the original submitting user may not be able to jump the
  322. job(s) they submitted. This is because the ownership of the job has also changed.
  323. X.SH OPTIONS
  324. X.TP 12
  325. X.BI \-e " entryno"
  326. MANDATORY. Specify the entry number in the queue of the job to be moved.
  327. X.TP
  328. X.BI \-v
  329. Display QBATCH version and copyright information.
  330. X.SH FILES
  331. X.ft B
  332. QUEUEPATH/*
  333. X.SH "SEE ALSO"
  334. X.BR qbatch (1L)
  335. X.BR jk (1L)
  336. X.BR jm (1L)
  337. X.BR jn (1L)
  338. X.BR jr (1L)
  339. X.BR js (1L)
  340. X.BR qa (1L)
  341. X.BR qc (8L)
  342. X.BR qd (1L)
  343. X.BR qe (1L)
  344. X.BR qf (1L)
  345. X.BR qg (1L)
  346. X.BR qh (1L)
  347. X.BR ql (1L)
  348. X.BR qp (1L)
  349. X.BR qs (1L)
  350. X.BR qt (1L)
  351. X.BR qw (1L)
  352. X.BR rc.QBATCH (8L)
  353. X.BR jobdone (8L)
  354. X.BR queue (5L)
  355. X.BR qxenv (5L)
  356. END_OF_FILE
  357. if test 2017 -ne `wc -c <'man/jj.l'`; then
  358.     echo shar: \"'man/jj.l'\" unpacked with wrong size!
  359. fi
  360. # end of 'man/jj.l'
  361. fi
  362. if test -f 'man/jk.l' -a "${1}" != "-c" ; then 
  363.   echo shar: Will not clobber existing file \"'man/jk.l'\"
  364. else
  365. echo shar: Extracting \"'man/jk.l'\" \(1690 characters\)
  366. sed "s/^X//" >'man/jk.l' <<'END_OF_FILE'
  367. X.TH JK 1L "14 May 1991" JK "QUEUED BATCH PROCESSING SYSTEM"
  368. X.SH COPYRIGHT
  369. The
  370. X.B QBATCH
  371. system and its related programs are Copyright:
  372. X.br
  373. X(c) Vita Services Ltd. 1990
  374. X.br
  375. X(c) Vita Fibres Ltd. 1991
  376. X.SH NAME 
  377. X.B jk
  378. X\- Job kill. remove a job from this queue (optionally kill it).
  379. X.SH SYNOPSIS
  380. X.B jk
  381. X[
  382. X.B \-k
  383. X]
  384. X[
  385. X.B \-a
  386. X]
  387. X[
  388. X.BI \-u " userid"
  389. X]
  390. X[
  391. X.BI \-e " entryno"
  392. X]
  393. X.B qname
  394. X|[
  395. X.BI \-v
  396. X]
  397. X.SH DESCRIPTION
  398. The identified entries are removed from the queue
  399. X(if they are owned by the user, or the user is the 
  400. super user) and the associated temporary jcl files 
  401. are deleted.
  402. X.br
  403. if the -k option is specified, and
  404. a job to be removed is being processed, the queue
  405. header is updated with the kill flag set, and a
  406. signal is sent to the queue process engine.
  407. X.SH OPTIONS
  408. X.TP 12
  409. X.B \-k
  410. Kill the job being removed if it is currently being
  411. processed.
  412. X.TP
  413. X.B \-a
  414. All. remove all jobs owned by the user. The super
  415. user may remove all jobs in the queue.
  416. X.TP
  417. X.BI \-u " userid"
  418. If the superuser uses the -a option, it's
  419. effect can be limited to those jobs owned by
  420. X<userid>. jk will fail if an ordinary user uses
  421. this option, and <userid> does not match his or 
  422. her own uid.
  423. X.TP
  424. X.BI \-e " entry number"
  425. XEither the -a option or this option are
  426. MANDATORY If not all jobs, then this identifies the entry to be 
  427. removed.
  428. X.TP
  429. X.BI \-v
  430. Display QBATCH version and copyright information.
  431. X.SH FILES
  432. X.ft B
  433. QUEUEPATH/*
  434. X.SH "SEE ALSO"
  435. X.BR qbatch (1L)
  436. X.BR jj (1L)
  437. X.BR jm (1L)
  438. X.BR jn (1L)
  439. X.BR jr (1L)
  440. X.BR js (1L)
  441. X.BR qa (1L)
  442. X.BR qc (8L)
  443. X.BR qd (1L)
  444. X.BR qe (1L)
  445. X.BR qf (1L)
  446. X.BR qg (1L)
  447. X.BR qh (1L)
  448. X.BR ql (1L)
  449. X.BR qp (1L)
  450. X.BR qs (1L)
  451. X.BR qt (1L)
  452. X.BR qw (1L)
  453. X.BR rc.QBATCH (8L)
  454. X.BR jobdone (8L)
  455. X.BR queue (5L)
  456. X.BR qxenv (5L)
  457. END_OF_FILE
  458. if test 1690 -ne `wc -c <'man/jk.l'`; then
  459.     echo shar: \"'man/jk.l'\" unpacked with wrong size!
  460. fi
  461. # end of 'man/jk.l'
  462. fi
  463. if test -f 'man/jm.l' -a "${1}" != "-c" ; then 
  464.   echo shar: Will not clobber existing file \"'man/jm.l'\"
  465. else
  466. echo shar: Extracting \"'man/jm.l'\" \(1511 characters\)
  467. sed "s/^X//" >'man/jm.l' <<'END_OF_FILE'
  468. X.TH JM 1L "14 May 1991" JM "QUEUED BATCH PROCESSING SYSTEM"
  469. X.SH COPYRIGHT
  470. The
  471. X.B QBATCH
  472. system and its related programs are Copyright:
  473. X.br
  474. X(c) Vita Services Ltd. 1990
  475. X.br
  476. X(c) Vita Fibres Ltd. 1991
  477. X.SH NAME 
  478. X.B jm
  479. X\- job monitor. Add or alter monitor for a given job.
  480. X.SH SYNOPSIS
  481. X.B jm
  482. X[
  483. X.BI \-e " entryno"
  484. X]
  485. X.B "qname monitor"
  486. X|[
  487. X.BI \-v
  488. X]
  489. X.SH DESCRIPTION
  490. The queue entry for the specified job is updated
  491. with the new monitor pathspec.
  492. X.br
  493. If the entry number is not specified, the first job 
  494. in the queue is assumed.
  495. X.br
  496. If the entry to be modified is actually being processed,
  497. the following action takes place:
  498. If the queue is the same as the QUEUE environment
  499. variable, and the specified monitor is NOT the same as
  500. that already stored in the queue entry, then after 
  501. updating the entry with the new monitor, the queue
  502. header is updated with the kill and repeat flags set
  503. and a signal is sent to the process engine. This will
  504. abandon, and restart the job with a new monitor.
  505. X.SH OPTIONS
  506. X.TP 12
  507. X.BI \-e " entryno"
  508. specify the entry number in the queue of the 
  509. job to be altered. Default is the first job in the queue.
  510. X.TP
  511. X.BI \-v
  512. Display QBATCH version and copyright information.
  513. X.SH FILES
  514. X.ft B
  515. QUEUEPATH/*
  516. X.SH "SEE ALSO"
  517. X.BR qbatch (1L)
  518. X.BR jj (1L)
  519. X.BR jk (1L)
  520. X.BR jn (1L)
  521. X.BR jr (1L)
  522. X.BR js (1L)
  523. X.BR qa (1L)
  524. X.BR qc (8L)
  525. X.BR qd (1L)
  526. X.BR qe (1L)
  527. X.BR qf (1L)
  528. X.BR qg (1L)
  529. X.BR qh (1L)
  530. X.BR ql (1L)
  531. X.BR qp (1L)
  532. X.BR qs (1L)
  533. X.BR qt (1L)
  534. X.BR qw (1L)
  535. X.BR rc.QBATCH (8L)
  536. X.BR jobdone (8L)
  537. X.BR queue (5L)
  538. X.BR qxenv (5L)
  539. END_OF_FILE
  540. if test 1511 -ne `wc -c <'man/jm.l'`; then
  541.     echo shar: \"'man/jm.l'\" unpacked with wrong size!
  542. fi
  543. # end of 'man/jm.l'
  544. fi
  545. if test -f 'man/jn.l' -a "${1}" != "-c" ; then 
  546.   echo shar: Will not clobber existing file \"'man/jn.l'\"
  547. else
  548. echo shar: Extracting \"'man/jn.l'\" \(1050 characters\)
  549. sed "s/^X//" >'man/jn.l' <<'END_OF_FILE'
  550. X.TH JN 1L "14 May 1991" JN "QUEUED BATCH PROCESSING SYSTEM"
  551. X.SH COPYRIGHT
  552. The
  553. X.B QBATCH
  554. system and its related programs are Copyright:
  555. X.br
  556. X(c) Vita Services Ltd. 1990
  557. X.br
  558. X(c) Vita Fibres Ltd. 1991
  559. X.SH NAME 
  560. X.B jn
  561. X\- job name. Add or alter name for a given job
  562. X.SH SYNOPSIS
  563. X.B jn
  564. X[
  565. X.BI \-e " entryno"
  566. X]
  567. X.B "qname namestring"
  568. X|[
  569. X.BI \-v
  570. X]
  571. X.SH DESCRIPTION
  572. The queue entry for the specified job is updated with
  573. the new descriptive name for the job. If entryno is not
  574. specified, the first job in the queue will be assumed.
  575. X.SH OPTIONS
  576. X.TP 12
  577. X.BI \-e " entryno"
  578. specify the entry number in the queue of the job to be altered.
  579. Default is the first job in the queue.
  580. X.TP
  581. X.BI \-v
  582. Display QBATCH version and copyright information.
  583. X.SH FILES
  584. X.ft B
  585. QUEUEPATH/*
  586. X.SH "SEE ALSO"
  587. X.BR qbatch (1L)
  588. X.BR jj (1L)
  589. X.BR jk (1L)
  590. X.BR jm (1L)
  591. X.BR jr (1L)
  592. X.BR js (1L)
  593. X.BR qa (1L)
  594. X.BR qc (8L)
  595. X.BR qd (1L)
  596. X.BR qe (1L)
  597. X.BR qf (1L)
  598. X.BR qg (1L)
  599. X.BR qh (1L)
  600. X.BR ql (1L)
  601. X.BR qp (1L)
  602. X.BR qs (1L)
  603. X.BR qt (1L)
  604. X.BR qw (1L)
  605. X.BR rc.QBATCH (8L)
  606. X.BR jobdone (8L)
  607. X.BR queue (5L)
  608. X.BR qxenv (5L)
  609. END_OF_FILE
  610. if test 1050 -ne `wc -c <'man/jn.l'`; then
  611.     echo shar: \"'man/jn.l'\" unpacked with wrong size!
  612. fi
  613. # end of 'man/jn.l'
  614. fi
  615. if test -f 'man/jobdone.l' -a "${1}" != "-c" ; then 
  616.   echo shar: Will not clobber existing file \"'man/jobdone.l'\"
  617. else
  618. echo shar: Extracting \"'man/jobdone.l'\" \(1387 characters\)
  619. sed "s/^X//" >'man/jobdone.l' <<'END_OF_FILE'
  620. X.TH JOBDONE 5L "14 May 1991" JOBDONE "QUEUED BATCH PROCESSING SYSTEM"
  621. X.SH COPYRIGHT
  622. The
  623. X.B QBATCH
  624. system and its related programs are Copyright:
  625. X.br
  626. X(c) Vita Services Ltd. 1990
  627. X.br
  628. X(c) Vita Fibres Ltd. 1991
  629. X.SH NAME 
  630. X.B jobdone
  631. X\- The interface script between the queue process engine and the
  632. submitting user.
  633. X.SH SYNOPSIS
  634. X.B jobdone
  635. X.B qname
  636. X.B entryno
  637. X.B action
  638. X.B username
  639. X.B tty
  640. X.SH DESCRIPTION
  641. X.B jobdone
  642. is a bourne shell script called by the queue process engine when a job has
  643. terminated. The parameters passed are as described above. In it's distributed
  644. version it simply either sends mail to the submitting user, or writes a message on 
  645. their tty, depending on the value of action.
  646. X.SH OPTIONS
  647. X.TP 12
  648. X.B qname
  649. The name of the queue in which the job ran.
  650. X.TP
  651. X.B entryno
  652. The actual entry number in the queue.
  653. X.TP
  654. X.B action
  655. The action to be taken:
  656. X.nf
  657. X    1. Write a message on tty.
  658. X    2. Mail submitting user.
  659. X    Anything else .. no action.
  660. X.fi
  661. X.TP
  662. X.B username
  663. The logged in name of the submitting user.
  664. X.TP
  665. X.B tty
  666. The terminal from which the job was submitted.
  667. X.SH FILES
  668. X.ft B
  669. QUEUEPATH/*
  670. X.SH "SEE ALSO"
  671. X.BR qbatch (1L)
  672. X.BR jj (1L)
  673. X.BR jk (1L)
  674. X.BR jm (1L)
  675. X.BR jn (1L)
  676. X.BR jr (1L)
  677. X.BR js (1L)
  678. X.BR qa (1L)
  679. X.BR qc (8L)
  680. X.BR qd (1L)
  681. X.BR qe (1L)
  682. X.BR qf (1L)
  683. X.BR qg (1L)
  684. X.BR qh (1L)
  685. X.BR ql (1L)
  686. X.BR qp (1L)
  687. X.BR qt (1L)
  688. X.BR qs (1L)
  689. X.BR qw (1L)
  690. X.BR rc.QBATCH (8L)
  691. X.BR queue (5L)
  692. X.BR qxenv (5L)
  693. END_OF_FILE
  694. if test 1387 -ne `wc -c <'man/jobdone.l'`; then
  695.     echo shar: \"'man/jobdone.l'\" unpacked with wrong size!
  696. fi
  697. # end of 'man/jobdone.l'
  698. fi
  699. if test -f 'man/jr.l' -a "${1}" != "-c" ; then 
  700.   echo shar: Will not clobber existing file \"'man/jr.l'\"
  701. else
  702. echo shar: Extracting \"'man/jr.l'\" \(1223 characters\)
  703. sed "s/^X//" >'man/jr.l' <<'END_OF_FILE'
  704. X.TH JR 5L "11 May 1991" JR "QUEUED BATCH PROCESSING SYSTEM"
  705. X.SH COPYRIGHT
  706. The
  707. X.B QBATCH
  708. system and its related programs are Copyright:
  709. X.br
  710. X(c) Vita Services Ltd. 1990
  711. X.br
  712. X(c) Vita Fibres Ltd. 1991
  713. X.SH NAME 
  714. X.B jr
  715. X\- job repeat. repeat (optionally kill) current job.
  716. X.SH SYNOPSIS
  717. X.B jr
  718. X[
  719. X.B \-k
  720. X]
  721. X.B qname
  722. X|[
  723. X.BI \-v
  724. X]
  725. X.SH DESCRIPTION
  726. The queue header is updated with the repeat and
  727. optionally the kill flag set, and a signal is sent
  728. to the process engine. When the job has terminated (or been killed),
  729. the entry will not be removed from the queue, but will remain to be reprocessed.
  730. X.SH OPTIONS
  731. X.TP 12
  732. X.B \-k
  733. Kill the job being processed. If the queue is
  734. active, abandons current process and starts
  735. again from the beginning of the jcl. If the queue
  736. has been stopped, the entry will remain in the 
  737. queue until it is processed again.
  738. X.TP
  739. X.BI \-v
  740. Display QBATCH version and copyright information.
  741. X.SH FILES
  742. X.ft B
  743. QUEUEPATH/*
  744. X.SH "SEE ALSO"
  745. X.BR qbatch (1L)
  746. X.BR jj (1L)
  747. X.BR jk (1L)
  748. X.BR jm (1L)
  749. X.BR jn (1L)
  750. X.BR js (1L)
  751. X.BR qa (1L)
  752. X.BR qc (8L)
  753. X.BR qd (1L)
  754. X.BR qe (1L)
  755. X.BR qf (1L)
  756. X.BR qg (1L)
  757. X.BR qh (1L)
  758. X.BR ql (1L)
  759. X.BR qp (1L)
  760. X.BR qs (1L)
  761. X.BR qt (1L)
  762. X.BR qw (1L)
  763. X.BR rc.QBATCH (8L)
  764. X.BR jobdone (8L)
  765. X.BR queue (5L)
  766. X.BR qxenv (5L)
  767. END_OF_FILE
  768. if test 1223 -ne `wc -c <'man/jr.l'`; then
  769.     echo shar: \"'man/jr.l'\" unpacked with wrong size!
  770. fi
  771. # end of 'man/jr.l'
  772. fi
  773. if test -f 'man/lman' -a "${1}" != "-c" ; then 
  774.   echo shar: Will not clobber existing file \"'man/lman'\"
  775. else
  776. echo shar: Extracting \"'man/lman'\" \(128 characters\)
  777. sed "s/^X//" >'man/lman' <<'END_OF_FILE'
  778. if [ -f $1 ]
  779. then
  780. for i in $*
  781. do
  782. echo $i
  783. nroff -man -Tman $i >../doc/`basename $i .l`
  784. done
  785. else
  786. echo "Usage: lman <manfile>"
  787. fi
  788. END_OF_FILE
  789. if test 128 -ne `wc -c <'man/lman'`; then
  790.     echo shar: \"'man/lman'\" unpacked with wrong size!
  791. fi
  792. chmod +x 'man/lman'
  793. # end of 'man/lman'
  794. fi
  795. if test -f 'man/qa.l' -a "${1}" != "-c" ; then 
  796.   echo shar: Will not clobber existing file \"'man/qa.l'\"
  797. else
  798. echo shar: Extracting \"'man/qa.l'\" \(1922 characters\)
  799. sed "s/^X//" >'man/qa.l' <<'END_OF_FILE'
  800. X.TH QE 1L "14 May 1991" QE "QUEUED BATCH PROCESSING SYSTEM"
  801. X.SH COPYRIGHT
  802. The
  803. X.B QBATCH
  804. system and its related programs are Copyright:
  805. X.br
  806. X(c) Vita Services Ltd. 1990
  807. X.br
  808. X(c) Vita Fibres Ltd. 1991
  809. X.SH NAME 
  810. X.B qa
  811. X\- Queue availability. List queues the user is permitted to submit to.
  812. X.SH SYNOPSIS
  813. X.B qa
  814. X.SH DESCRIPTION
  815. This script echoes headings, then calls qt -l for each file in QUEUEPATH.  The result is a list
  816. of brief queue status information of all queues that the user is permitted to submit jobs to.
  817. X.RS -6
  818. viz:
  819. X.nf
  820. Queues available to alan
  821. X
  822. Queue      No.       Priority      Fixed   Enabled Halted  Stopped
  823. Name     Entries      (nice)      Context
  824. X
  825. fasq          2         -5           no       yes     no      no 
  826. fault         0          0           no       yes     no      no 
  827. fcon         14         10           yes      yes     no      yes
  828. fcsq          4          5           no       yes     no      no 
  829. fcst          1         -5           no       yes     no      no 
  830. intq          0          0           no       no      no      no 
  831. invq          1          0           no       yes     no      no 
  832. mant          2         -5           no       yes     no      no 
  833. masq          2         -5           no       yes     no      no 
  834. mbsq          0         10           no       no      no      no 
  835. slwq          8         15           no       yes     no      no 
  836. sopq          4          5           no       yes     no      no 
  837. sopt          3         -5           no       yes     no      no 
  838. work         11          8           no       yes     no      no 
  839. X.RE
  840. X.fi
  841. X.SH OPTIONS
  842. X.SH FILES
  843. X.ft B
  844. QUEUEPATH/*
  845. X.SH "SEE ALSO"
  846. X.BR qbatch (1L)
  847. X.BR jj (1L)
  848. X.BR jk (1L)
  849. X.BR jm (1L)
  850. X.BR jn (1L)
  851. X.BR jr (1L)
  852. X.BR js (1L)
  853. X.BR qc (8L)
  854. X.BR qd (1L)
  855. X.BR qf (1L)
  856. X.BR qg (1L)
  857. X.BR qh (1L)
  858. X.BR ql (1L)
  859. X.BR qp (1L)
  860. X.BR qs (1L)
  861. X.BR qt (1L)
  862. X.BR qw (1L)
  863. X.BR rc.QBATCH (8L)
  864. X.BR jobdone (8L)
  865. X.BR queue (5L)
  866. X.BR qxenv (5L)
  867. END_OF_FILE
  868. if test 1922 -ne `wc -c <'man/qa.l'`; then
  869.     echo shar: \"'man/qa.l'\" unpacked with wrong size!
  870. fi
  871. # end of 'man/qa.l'
  872. fi
  873. if test -f 'man/qd.l' -a "${1}" != "-c" ; then 
  874.   echo shar: Will not clobber existing file \"'man/qd.l'\"
  875. else
  876. echo shar: Extracting \"'man/qd.l'\" \(873 characters\)
  877. sed "s/^X//" >'man/qd.l' <<'END_OF_FILE'
  878. X.TH QD 1L "14 May 1991" QD "QUEUED BATCH PROCESSING SYSTEM"
  879. X.SH COPYRIGHT
  880. The
  881. X.B QBATCH
  882. system and its related programs are Copyright:
  883. X.br
  884. X(c) Vita Services Ltd. 1990
  885. X.br
  886. X(c) Vita Fibres Ltd. 1991
  887. X.SH NAME 
  888. X.B qd
  889. X\- Queue disable. Prevent jobs being submitted to this queue.
  890. X.SH SYNOPSIS
  891. X.B qd
  892. X.BI qname
  893. X|[
  894. X.BI \-v
  895. X]
  896. X.SH DESCRIPTION
  897. The queue header will be updated with the enabled flag 
  898. unset such that further attempts to submit a job to
  899. this queue will be rejected.
  900. X.SH OPTIONS
  901. X.TP
  902. X.BI \-v
  903. Display QBATCH version and copyright information.
  904. X.SH FILES
  905. X.ft B
  906. QUEUEPATH/*
  907. X.SH "SEE ALSO"
  908. X.BR qbatch (1L)
  909. X.BR jj (1L)
  910. X.BR jk (1L)
  911. X.BR jm (1L)
  912. X.BR jn (1L)
  913. X.BR jr (1L)
  914. X.BR js (1L)
  915. X.BR qa (1L)
  916. X.BR qc (8L)
  917. X.BR qe (1L)
  918. X.BR qf (1L)
  919. X.BR qg (1L)
  920. X.BR qh (1L)
  921. X.BR ql (1L)
  922. X.BR qp (1L)
  923. X.BR qs (1L)
  924. X.BR qt (1L)
  925. X.BR qw (1L)
  926. X.BR rc.QBATCH (8L)
  927. X.BR jobdone (8L)
  928. X.BR queue (5L)
  929. X.BR qxenv (5L)
  930. END_OF_FILE
  931. if test 873 -ne `wc -c <'man/qd.l'`; then
  932.     echo shar: \"'man/qd.l'\" unpacked with wrong size!
  933. fi
  934. # end of 'man/qd.l'
  935. fi
  936. if test -f 'man/qe.l' -a "${1}" != "-c" ; then 
  937.   echo shar: Will not clobber existing file \"'man/qe.l'\"
  938. else
  939. echo shar: Extracting \"'man/qe.l'\" \(874 characters\)
  940. sed "s/^X//" >'man/qe.l' <<'END_OF_FILE'
  941. X.TH QE 1L "14 May 1991" QE "QUEUED BATCH PROCESSING SYSTEM"
  942. X.SH COPYRIGHT
  943. The
  944. X.B QBATCH
  945. system and its related programs are Copyright:
  946. X.br
  947. X(c) Vita Services Ltd. 1990
  948. X.br
  949. X(c) Vita Fibres Ltd. 1991
  950. X.SH NAME 
  951. X.B qe
  952. X\- Queue enable. Enable jobs to be submitted to this queue.
  953. X.SH SYNOPSIS
  954. X.B qe
  955. X.BI qname  
  956. X|[
  957. X.BI \-v
  958. X]
  959. X.SH DESCRIPTION
  960. The queue header will be updated with the enabled flag 
  961. reset such that further attempts to submit a job to
  962. this queue will be permitted.
  963. X.SH OPTIONS
  964. X.TP
  965. X.BI \-v
  966. Display QBATCH version and copyright information.
  967. X.SH FILES
  968. X.ft B
  969. QUEUEPATH/*
  970. X.SH "SEE ALSO"
  971. X.BR qbatch (1L)
  972. X.BR jj (1L)
  973. X.BR jk (1L)
  974. X.BR jm (1L)
  975. X.BR jn (1L)
  976. X.BR jr (1L)
  977. X.BR js (1L)
  978. X.BR qa (1L)
  979. X.BR qc (8L)
  980. X.BR qd (1L)
  981. X.BR qf (1L)
  982. X.BR qg (1L)
  983. X.BR qh (1L)
  984. X.BR ql (1L)
  985. X.BR qp (1L)
  986. X.BR qs (1L)
  987. X.BR qt (1L)
  988. X.BR qw (1L)
  989. X.BR rc.QBATCH (8L)
  990. X.BR jobdone (8L)
  991. X.BR queue (5L)
  992. X.BR qxenv (5L)
  993. END_OF_FILE
  994. if test 874 -ne `wc -c <'man/qe.l'`; then
  995.     echo shar: \"'man/qe.l'\" unpacked with wrong size!
  996. fi
  997. # end of 'man/qe.l'
  998. fi
  999. if test -f 'man/qg.l' -a "${1}" != "-c" ; then 
  1000.   echo shar: Will not clobber existing file \"'man/qg.l'\"
  1001. else
  1002. echo shar: Extracting \"'man/qg.l'\" \(973 characters\)
  1003. sed "s/^X//" >'man/qg.l' <<'END_OF_FILE'
  1004. X.TH QG 1L "14 May 1991" QG "QUEUED BATCH PROCESSING SYSTEM"
  1005. X.SH COPYRIGHT
  1006. The
  1007. X.B QBATCH
  1008. system and its related programs are Copyright:
  1009. X.br
  1010. X(c) Vita Services Ltd. 1990
  1011. X.br
  1012. X(c) Vita Fibres Ltd. 1991
  1013. X.SH NAME 
  1014. X.B qg
  1015. X\- Queue go. resume processing of currently suspended job in this queue.
  1016. X.SH SYNOPSIS
  1017. X.B qg
  1018. X.BI qname
  1019. X|[
  1020. X.BI \-v
  1021. X]
  1022. X.SH DESCRIPTION
  1023. The queue header will be updated with the halt flag
  1024. unset, and a signal will be sent to the process activity.
  1025. X.br
  1026. The process activity will send a SIGCONT signal to the
  1027. process group of the job to resume the job's processing.
  1028. X.SH OPTIONS
  1029. X.TP
  1030. X.BI \-v
  1031. Display QBATCH version and copyright information.
  1032. X.SH FILES
  1033. X.ft B
  1034. QUEUEPATH/*
  1035. X.SH "SEE ALSO"
  1036. X.BR qbatch (1L)
  1037. X.BR jj (1L)
  1038. X.BR jk (1L)
  1039. X.BR jm (1L)
  1040. X.BR jn (1L)
  1041. X.BR jr (1L)
  1042. X.BR js (1L)
  1043. X.BR qa (1L)
  1044. X.BR qc (8L)
  1045. X.BR qd (1L)
  1046. X.BR qe (1L)
  1047. X.BR qf (1L)
  1048. X.BR qh (1L)
  1049. X.BR ql (1L)
  1050. X.BR qp (1L)
  1051. X.BR qs (1L)
  1052. X.BR qt (1L)
  1053. X.BR qw (1L)
  1054. X.BR rc.QBATCH (8L)
  1055. X.BR jobdone (8L)
  1056. X.BR queue (5L)
  1057. X.BR qxenv (5L)
  1058. END_OF_FILE
  1059. if test 973 -ne `wc -c <'man/qg.l'`; then
  1060.     echo shar: \"'man/qg.l'\" unpacked with wrong size!
  1061. fi
  1062. # end of 'man/qg.l'
  1063. fi
  1064. if test -f 'man/qh.l' -a "${1}" != "-c" ; then 
  1065.   echo shar: Will not clobber existing file \"'man/qh.l'\"
  1066. else
  1067. echo shar: Extracting \"'man/qh.l'\" \(990 characters\)
  1068. sed "s/^X//" >'man/qh.l' <<'END_OF_FILE'
  1069. X.TH QH 1L "14 May 1991" QH "QUEUED BATCH PROCESSING SYSTEM"
  1070. X.SH COPYRIGHT
  1071. The
  1072. X.B QBATCH
  1073. system and its related programs are Copyright:
  1074. X.br
  1075. X(c) Vita Services Ltd. 1990
  1076. X.br
  1077. X(c) Vita Fibres Ltd. 1991
  1078. X.SH NAME 
  1079. X.B qh
  1080. X\- Queue halt. suspend processing of current job in this queue.
  1081. X.SH SYNOPSIS
  1082. X.BI qh  " qname"
  1083. X|[
  1084. X.BI \-v
  1085. X]
  1086. X.SH DESCRIPTION
  1087. The queue header will be updated with the halt flag set
  1088. and a signal will be sent to the process activity.
  1089. X.br
  1090. The process activity will send a SIGSTOP signal to the 
  1091. process group of the job to suspend the job's (and all it's children's) processing.
  1092. X.SH OPTIONS
  1093. X.TP
  1094. X.BI \-v
  1095. Display QBATCH version and copyright information.
  1096. X.SH FILES
  1097. X.ft B
  1098. QUEUEPATH/*
  1099. X.SH "SEE ALSO"
  1100. X.BR qbatch (1L)
  1101. X.BR jj (1L)
  1102. X.BR jk (1L)
  1103. X.BR jm (1L)
  1104. X.BR jn (1L)
  1105. X.BR jr (1L)
  1106. X.BR js (1L)
  1107. X.BR qa (1L)
  1108. X.BR qc (8L)
  1109. X.BR qd (1L)
  1110. X.BR qe (1L)
  1111. X.BR qf (1L)
  1112. X.BR qg (1L)
  1113. X.BR ql (1L)
  1114. X.BR qp (1L)
  1115. X.BR qs (1L)
  1116. X.BR qt (1L)
  1117. X.BR qw (1L)
  1118. X.BR rc.QBATCH (8L)
  1119. X.BR jobdone (8L)
  1120. X.BR queue (5L)
  1121. X.BR qxenv (5L)
  1122. END_OF_FILE
  1123. if test 990 -ne `wc -c <'man/qh.l'`; then
  1124.     echo shar: \"'man/qh.l'\" unpacked with wrong size!
  1125. fi
  1126. # end of 'man/qh.l'
  1127. fi
  1128. if test -f 'man/ql.l' -a "${1}" != "-c" ; then 
  1129.   echo shar: Will not clobber existing file \"'man/ql.l'\"
  1130. else
  1131. echo shar: Extracting \"'man/ql.l'\" \(2521 characters\)
  1132. sed "s/^X//" >'man/ql.l' <<'END_OF_FILE'
  1133. X.TH QL 1L "14 May 1991" QL "QUEUED BATCH PROCESSING SYSTEM"
  1134. X.SH COPYRIGHT
  1135. The
  1136. X.B QBATCH
  1137. system and its related programs are Copyright:
  1138. X.br
  1139. X(c) Vita Services Ltd. 1990
  1140. X.br
  1141. X(c) Vita Fibres Ltd. 1991
  1142. X.SH NAME 
  1143. X.B ql
  1144. X\- queue list. list the contents and status of a queue.
  1145. X.SH SYNOPSIS
  1146. X.B ql
  1147. X[
  1148. X.B \-a
  1149. X]
  1150. X.B qname
  1151. X|[
  1152. X.BI \-v
  1153. X]
  1154. X.SH DESCRIPTION
  1155. A formatted report on the status of the named queue is produced on stdout as follows:
  1156. X.br
  1157. A. An idle queue:
  1158. X.nf
  1159. X.sp
  1160. Status of           : work 
  1161. Spooling in         : /var/spool/batch/
  1162. Monitor is          : /var/spool/batch/work.mon
  1163. Priority is         : 0
  1164. Queue last started  :  2/10/91 15:02:37
  1165. Queue is idle
  1166. X
  1167. X   No of    Active   Queue      Job       Job      Queue     Queue
  1168. X  Entries   (pid)  Accepting Repeated    Killed    Halted   Stopped
  1169. X       2     No       Yes       No        No        No        Yes
  1170. X
  1171. X  1        alan        ttyp1     23/04/90 16:34:36  Cobol compilation
  1172. X  2        fred        ttyh4     23/04/90 17:04:36  Statements run
  1173. X.sp
  1174. B. An active queue:
  1175. X.sp
  1176. Status of           : work 
  1177. Spooling in         : /var/spool/batch/
  1178. Monitor is          : /var/spool/batch/work.mon
  1179. Priority is         : 0
  1180. Queue last started  :  2/10/91 15:02:37
  1181. Current job started : 23/04/90  17:08:50
  1182. X
  1183. X   No of    Active   Queue      Job       Job      Queue     Queue
  1184. X  Entries   (pid)  Accepting Repeated    Killed    Halted   Stopped
  1185. X       2    1698      Yes       No        No        No        No
  1186. X
  1187. X  1  1703  alan        ttyp1     23/04/90 16:34:36  Cobol compilation
  1188. X  2        fred        ttyh4     23/04/90 17:04:36  Statements run
  1189. X.fi
  1190. X.sp
  1191. Information from the queue header is displayed, including the default files
  1192. and directories. All relevant queue flags are displayed. Each job in the queue
  1193. is displayed on a separate line following the header information.
  1194. X.br
  1195. In an active queue, the pid of the queue process activity is displayed with
  1196. the header details, and the pid of the currently running job is displayed in
  1197. the first entry record.
  1198. X.SH OPTIONS
  1199. X.TP 12
  1200. X.B \-a
  1201. All. Print the uid, gid, jcl filename and monitor filename
  1202. for each job in the queue as well as the basic information.
  1203. X.TP
  1204. X.BI \-v
  1205. Display QBATCH version and copyright information.
  1206. X.SH FILES
  1207. X.ft B
  1208. QUEUEPATH/*
  1209. X.SH "SEE ALSO"
  1210. X.BR qbatch (1L)
  1211. X.BR jj (1L)
  1212. X.BR jk (1L)
  1213. X.BR jm (1L)
  1214. X.BR jn (1L)
  1215. X.BR jr (1L)
  1216. X.BR js (1L)
  1217. X.BR qa (1L)
  1218. X.BR qc (8L)
  1219. X.BR qd (1L)
  1220. X.BR qe (1L)
  1221. X.BR qf (1L)
  1222. X.BR qg (1L)
  1223. X.BR qh (1L)
  1224. X.BR qp (1L)
  1225. X.BR qs (1L)
  1226. X.BR qt (1L)
  1227. X.BR qw (1L)
  1228. X.BR rc.QBATCH (8L)
  1229. X.BR jobdone (8L)
  1230. X.BR queue (5L)
  1231. X.BR qxenv (5L)
  1232. END_OF_FILE
  1233. if test 2521 -ne `wc -c <'man/ql.l'`; then
  1234.     echo shar: \"'man/ql.l'\" unpacked with wrong size!
  1235. fi
  1236. # end of 'man/ql.l'
  1237. fi
  1238. if test -f 'man/qp.l' -a "${1}" != "-c" ; then 
  1239.   echo shar: Will not clobber existing file \"'man/qp.l'\"
  1240. else
  1241. echo shar: Extracting \"'man/qp.l'\" \(1758 characters\)
  1242. sed "s/^X//" >'man/qp.l' <<'END_OF_FILE'
  1243. X.TH QP 1L "11 May 1991" QP "QUEUED BATCH PROCESSING SYSTEM"
  1244. X.SH COPYRIGHT
  1245. The
  1246. X.B QBATCH
  1247. system and its related programs are Copyright:
  1248. X.br
  1249. X(c) Vita Services Ltd. 1990
  1250. X.br
  1251. X(c) Vita Fibres Ltd. 1991
  1252. X.SH NAME 
  1253. X.B qp
  1254. X\- queue process. start a process engine for a given queue
  1255. X.SH SYNOPSIS
  1256. X.B qp
  1257. X.B qname
  1258. X|[
  1259. X.BI \-v
  1260. X]
  1261. X.SH DESCRIPTION
  1262. X.B qp
  1263. will start a background process which monitors the named queue, and when the queue
  1264. contains jobs to be processed, will fork a child activity to do so. The child will set uid
  1265. and gid to match those of the submittor, or in the case of a fixed context queue, that 
  1266. specified, set up the environment, and execute the job.
  1267. X.B qp
  1268. will then wait for the child to finish processing before checking the queue for more
  1269. jobs.
  1270. X.B qp
  1271. also handles signal communication with the (single at any time) running job in the named queue,
  1272. X(halt, go, and kill). If there are no jobs waiting in the queue, 
  1273. X.B qp 
  1274. will wait for a signal from one of the queue or job management programs.
  1275. X.B qp
  1276. also sets the stdout and stderr for the child job to a file (usually defaulted when the queue
  1277. is created) qp will checkpoint this file at the start and end of each job, and write profile
  1278. timings of the form queued (time on queue before processing started, real (wall clock), user
  1279. and system cpu times. The time formats are of the form HH:MM:SS.ss.
  1280. X.SH OPTIONS
  1281. X.TP 12
  1282. X.BI \-v
  1283. Display QBATCH version and copyright information.
  1284. X.SH FILES
  1285. X.ft B
  1286. QUEUEPATH/*
  1287. X.SH "SEE ALSO"
  1288. X.BR qbatch (1L)
  1289. X.BR jj (1L)
  1290. X.BR jk (1L)
  1291. X.BR jm (1L)
  1292. X.BR jn (1L)
  1293. X.BR jr (1L)
  1294. X.BR js (1L)
  1295. X.BR qa (1L)
  1296. X.BR qc (8L)
  1297. X.BR qd (1L)
  1298. X.BR qe (1L)
  1299. X.BR qf (1L)
  1300. X.BR qg (1L)
  1301. X.BR qh (1L)
  1302. X.BR ql (1L)
  1303. X.BR qs (1L)
  1304. X.BR qt (1L)
  1305. X.BR qw (1L)
  1306. X.BR rc.QBATCH (8L)
  1307. X.BR jobdone (8L)
  1308. X.BR queue (5L)
  1309. X.BR qxenv (5L)
  1310. END_OF_FILE
  1311. if test 1758 -ne `wc -c <'man/qp.l'`; then
  1312.     echo shar: \"'man/qp.l'\" unpacked with wrong size!
  1313. fi
  1314. # end of 'man/qp.l'
  1315. fi
  1316. if test -f 'man/qs.l' -a "${1}" != "-c" ; then 
  1317.   echo shar: Will not clobber existing file \"'man/qs.l'\"
  1318. else
  1319. echo shar: Extracting \"'man/qs.l'\" \(1835 characters\)
  1320. sed "s/^X//" >'man/qs.l' <<'END_OF_FILE'
  1321. X.TH QS 5L "11 May 1991" QS "QUEUED BATCH PROCESSING SYSTEM"
  1322. X.SH COPYRIGHT
  1323. The
  1324. X.B QBATCH
  1325. system and its related programs are Copyright:
  1326. X.br
  1327. X(c) Vita Services Ltd. 1990
  1328. X.br
  1329. X(c) Vita Fibres Ltd. 1991
  1330. X.SH NAME 
  1331. X.B qs
  1332. X\- Queue stop. Terminate the queue process engine for the named queue.
  1333. X.SH SYNOPSIS
  1334. X.B qs
  1335. X[[
  1336. X.B \-k
  1337. X]
  1338. X|
  1339. X[
  1340. X.B \-r
  1341. X]]
  1342. X[
  1343. X.B \-w
  1344. X]
  1345. X.B qname
  1346. X|[
  1347. X.BI \-v
  1348. X]
  1349. X.SH DESCRIPTION
  1350. The queue header is updated with the stop flag (and optionally
  1351. the kill and repeat flags) set. When the current job terminates
  1352. X(which will be immediately if the kill flag is set), the process
  1353. engine will update the queue header to remove it's process id,
  1354. If the -w option is specified, the program will sleep for 30
  1355. seconds, then check the queue header. It will repeat this cycle
  1356. until the process engine pid is found to be zero, (that is the job
  1357. has finished, and the engine has terminated) and then terminate.            
  1358. If the -w option is not specified, the program will terminate 
  1359. immediately upon updating the queue header.
  1360. X.SH OPTIONS
  1361. X.TP 12
  1362. X.B \-k
  1363. Kill. Kill the currently running job so that the queue 
  1364. process terminates immediately.
  1365. X.TP
  1366. X.B \-r
  1367. Repeat and kill. Update the repeat flag in the queue
  1368. header, and kill the job. The process engine will terminate 
  1369. immediately, but the job will not be removed from the queue
  1370. and will be available to be rerun when the process engine is
  1371. restarted.
  1372. X.TP
  1373. X.B \-w
  1374. Wait until current job has completed before exiting.
  1375. X.TP
  1376. X.BI \-v
  1377. Display QBATCH version and copyright information.
  1378. X.SH FILES
  1379. X.ft B
  1380. QUEUEPATH/*
  1381. X.SH "SEE ALSO"
  1382. X.BR qbatch (1L)
  1383. X.BR jj (1L)
  1384. X.BR jk (1L)
  1385. X.BR jm (1L)
  1386. X.BR jn (1L)
  1387. X.BR jr (1L)
  1388. X.BR js (1L)
  1389. X.BR qa (1L)
  1390. X.BR qc (8L)
  1391. X.BR qd (1L)
  1392. X.BR qe (1L)
  1393. X.BR qf (1L)
  1394. X.BR qg (1L)
  1395. X.BR qh (1L)
  1396. X.BR ql (1L)
  1397. X.BR qp (1L)
  1398. X.BR qt (1L)
  1399. X.BR qw (1L)
  1400. X.BR rc.QBATCH (8L)
  1401. X.BR jobdone (8L)
  1402. X.BR queue (5L)
  1403. X.BR qxenv (5L)
  1404. END_OF_FILE
  1405. if test 1835 -ne `wc -c <'man/qs.l'`; then
  1406.     echo shar: \"'man/qs.l'\" unpacked with wrong size!
  1407. fi
  1408. # end of 'man/qs.l'
  1409. fi
  1410. if test -f 'man/qw.l' -a "${1}" != "-c" ; then 
  1411.   echo shar: Will not clobber existing file \"'man/qw.l'\"
  1412. else
  1413. echo shar: Extracting \"'man/qw.l'\" \(1057 characters\)
  1414. sed "s/^X//" >'man/qw.l' <<'END_OF_FILE'
  1415. X.TH QW 1L "14 May 1991" QW "QUEUED BATCH PROCESSING SYSTEM"
  1416. X.SH COPYRIGHT
  1417. The
  1418. X.B QBATCH
  1419. system and its related programs are Copyright:
  1420. X.br
  1421. X(c) Vita Services Ltd. 1990
  1422. X.br
  1423. X(c) Vita Fibres Ltd. 1991
  1424. X.SH NAME 
  1425. X.B qw
  1426. X\- Queue wait. Wait until the queue process engine has terminated.
  1427. X.SH SYNOPSIS
  1428. X.B qw
  1429. X.BI qname  
  1430. X|[
  1431. X.BI \-v
  1432. X]
  1433. X.SH DESCRIPTION
  1434. The queue header will be read and if the queue is idle (the
  1435. queue process engine pid is zero) the program will terminate
  1436. immediately. If the queue is not idle, the program will sleep 
  1437. for 30 seconds, and check the header again. This will be 
  1438. repeated until the queue becomes idle, when the program will
  1439. terminate.
  1440. X.SH OPTIONS
  1441. X.TP
  1442. X.BI \-v
  1443. Display QBATCH version and copyright information.
  1444. X.SH FILES
  1445. X.ft B
  1446. QUEUEPATH/*
  1447. X.SH "SEE ALSO"
  1448. X.BR qbatch (1L)
  1449. X.BR jj (1L)
  1450. X.BR jk (1L)
  1451. X.BR jm (1L)
  1452. X.BR jn (1L)
  1453. X.BR jr (1L)
  1454. X.BR js (1L)
  1455. X.BR qa (1L)
  1456. X.BR qc (8L)
  1457. X.BR qd (1L)
  1458. X.BR qe (1L)
  1459. X.BR qf (1L)
  1460. X.BR qg (1L)
  1461. X.BR qh (1L)
  1462. X.BR ql (1L)
  1463. X.BR qp (1L)
  1464. X.BR qs (1L)
  1465. X.BR qt (1L)
  1466. X.BR rc.QBATCH (8L)
  1467. X.BR jobdone (8L)
  1468. X.BR queue (5L)
  1469. X.BR qxenv (5L)
  1470. END_OF_FILE
  1471. if test 1057 -ne `wc -c <'man/qw.l'`; then
  1472.     echo shar: \"'man/qw.l'\" unpacked with wrong size!
  1473. fi
  1474. # end of 'man/qw.l'
  1475. fi
  1476. if test -f 'man/qxenv.l' -a "${1}" != "-c" ; then 
  1477.   echo shar: Will not clobber existing file \"'man/qxenv.l'\"
  1478. else
  1479. echo shar: Extracting \"'man/qxenv.l'\" \(1083 characters\)
  1480. sed "s/^X//" >'man/qxenv.l' <<'END_OF_FILE'
  1481. X.TH QXENV 5L "11 May 1991" QXENV "QUEUED BATCH PROCESSING SYSTEM"
  1482. X.SH COPYRIGHT
  1483. The
  1484. X.B QBATCH
  1485. system and its related programs are Copyright:
  1486. X.br
  1487. X(c) Vita Services Ltd. 1990
  1488. X.br
  1489. X(c) Vita Fibres Ltd. 1991
  1490. X.SH NAME 
  1491. X.B \.qxenv
  1492. X\- Description of a qbatch .qxenv file.
  1493. X.SH DESCRIPTION
  1494. X .qxenv is a file used by the
  1495. X.B QBATCH
  1496. system to store information on a system - wide basis relating to environment
  1497. variables which are not to be copied to the environment of running jobs.
  1498. Certain environment variables (such as TERM and TERMCAP) have no meaning in a
  1499. batch context, others may unknowingly alter the processing of a batch job.
  1500. X .qxenv is a simple text file, readable (only) by root, containing a list
  1501. X(one per line) of the environment variables to be excluded.
  1502. X.SH FILES
  1503. X.ft B
  1504. QUEUEPATH/*
  1505. X.SH "SEE ALSO"
  1506. X.BR qbatch (1L)
  1507. X.BR jj (1L)
  1508. X.BR jk (1L)
  1509. X.BR jm (1L)
  1510. X.BR jn (1L)
  1511. X.BR jr (1L)
  1512. X.BR js (1L)
  1513. X.BR qa (1L)
  1514. X.BR qc (8L)
  1515. X.BR qd (1L)
  1516. X.BR qe (1L)
  1517. X.BR qf (1L)
  1518. X.BR qg (1L)
  1519. X.BR qh (1L)
  1520. X.BR ql (1L)
  1521. X.BR qp (1L)
  1522. X.BR qs (1L)
  1523. X.BR qt (1L)
  1524. X.BR qw (1L)
  1525. X.BR rc.QBATCH (8L)
  1526. X.BR jobdone (8L)
  1527. X.BR queue (5L)
  1528. END_OF_FILE
  1529. if test 1083 -ne `wc -c <'man/qxenv.l'`; then
  1530.     echo shar: \"'man/qxenv.l'\" unpacked with wrong size!
  1531. fi
  1532. # end of 'man/qxenv.l'
  1533. fi
  1534. if test -f 'man/rc.QBATCH.l' -a "${1}" != "-c" ; then 
  1535.   echo shar: Will not clobber existing file \"'man/rc.QBATCH.l'\"
  1536. else
  1537. echo shar: Extracting \"'man/rc.QBATCH.l'\" \(1549 characters\)
  1538. sed "s/^X//" >'man/rc.QBATCH.l' <<'END_OF_FILE'
  1539. X.TH rc.QBATCH 8L "14 May 1991" rc.QBATCH "QUEUED BATCH PROCESSING SYSTEM"
  1540. X.SH COPYRIGHT
  1541. The
  1542. X.B QBATCH
  1543. system and its related programs are Copyright:
  1544. X.br
  1545. X(c) Vita Services Ltd. 1990
  1546. X.br
  1547. X(c) Vita Fibres Ltd. 1991
  1548. X.SH NAME 
  1549. X.B rc.QBATCH
  1550. X\- QBATCH system startup script.
  1551. X.SH SYNOPSIS
  1552. X.B "/etc/rc.QBATCH"
  1553. X>/dev/console
  1554. X.SH DESCRIPTION
  1555. rc.QBATCH should be called from the system startup script. This may vary between
  1556. systems, but is usually in /etc, and usually starts with rc. There may in fact be several files
  1557. or directories relating to system startup.
  1558. X.br
  1559. X.B rc.QBATCH
  1560. examines the qbatch directory (QUEUEPATH or a directory linked to it), and for each of the 
  1561. files found, checks that it is a valid
  1562. X.B QBATCH
  1563. queue. If it is, it then checks the pid stored in the queue header. If this pid is non - zero, it
  1564. is assumed that the queue was being processed when the system was shut down. In this case
  1565. X.B rc.QBATCH
  1566. will start a new process engine.
  1567. X.br
  1568. if
  1569. X.B rc.QBATCH
  1570. restarts a queue, it will further check whether a job was being processed
  1571. when the machine shut down. If so,
  1572. X.B rc.QBATCH
  1573. will sleep for 20 seconds after starting the queue process engine to ensure
  1574. that the job has processed to a 'settled' state.
  1575. X.SH OPTIONS
  1576. None.
  1577. X.SH FILES
  1578. X.ft B
  1579. QUEUEPATH/*
  1580. X.SH "SEE ALSO"
  1581. X.BR qbatch (1L)
  1582. X.BR jj (1L)
  1583. X.BR jk (1L)
  1584. X.BR jm (1L)
  1585. X.BR jn (1L)
  1586. X.BR jr (1L)
  1587. X.BR js (1L)
  1588. X.BR qa (1L)
  1589. X.BR qc (8L)
  1590. X.BR qd (1L)
  1591. X.BR qe (1L)
  1592. X.BR qf (1L)
  1593. X.BR qg (1L)
  1594. X.BR qh (1L)
  1595. X.BR ql (1L)
  1596. X.BR qp (1L)
  1597. X.BR qs (1L)
  1598. X.BR qt (1L)
  1599. X.BR qw (1L)
  1600. X.BR jobdone (8L)
  1601. X.BR queue (5L)
  1602. X.BR qxenv (5L)
  1603. END_OF_FILE
  1604. if test 1549 -ne `wc -c <'man/rc.QBATCH.l'`; then
  1605.     echo shar: \"'man/rc.QBATCH.l'\" unpacked with wrong size!
  1606. fi
  1607. # end of 'man/rc.QBATCH.l'
  1608. fi
  1609. if test ! -d 'src' ; then
  1610.     echo shar: Creating directory \"'src'\"
  1611.     mkdir 'src'
  1612. fi
  1613. if test -f 'src/jdgen' -a "${1}" != "-c" ; then 
  1614.   echo shar: Will not clobber existing file \"'src/jdgen'\"
  1615. else
  1616. echo shar: Extracting \"'src/jdgen'\" \(325 characters\)
  1617. sed "s/^X//" >'src/jdgen' <<'END_OF_FILE'
  1618. cat >jobdone <<EOFjd
  1619. X#!$1
  1620. X#
  1621. X# job completion notification script . called from qp
  1622. X#
  1623. X# parameters queuename, entryno, action type, username, tty.
  1624. X#
  1625. case \$3 in
  1626. X    1) action="write \$4 \$5"
  1627. X       ;;
  1628. X    2) action="mail \$4"
  1629. X       ;;
  1630. X    *) exit 0;
  1631. esac
  1632. X\$action <<eof
  1633. Job (entry \$2) has finished processing in \$1
  1634. eof
  1635. exit 0
  1636. XEOFjd
  1637. exit 0
  1638. END_OF_FILE
  1639. if test 325 -ne `wc -c <'src/jdgen'`; then
  1640.     echo shar: \"'src/jdgen'\" unpacked with wrong size!
  1641. fi
  1642. chmod +x 'src/jdgen'
  1643. # end of 'src/jdgen'
  1644. fi
  1645. if test -f 'src/jr.c' -a "${1}" != "-c" ; then 
  1646.   echo shar: Will not clobber existing file \"'src/jr.c'\"
  1647. else
  1648. echo shar: Extracting \"'src/jr.c'\" \(2269 characters\)
  1649. sed "s/^X//" >'src/jr.c' <<'END_OF_FILE'
  1650. X/************************************************************************/  
  1651. X/*                                                                      */
  1652. X/* jr .. job repeat. repeat (optionally to kill) current job)           */
  1653. X/*                                                                      */
  1654. X/*      usage: jr [-k]  qname                                      */
  1655. X/*                                                                      */
  1656. X/*   Copyright (c) Vita Services 1990                                   */
  1657. X/*             (c) Vita Fibres   1990 1991                              */
  1658. X/*                                                                      */
  1659. X/************************************************************************/
  1660. X
  1661. X#include "qbatch.h"
  1662. int fpq = 0;
  1663. int kflag = 0, rflag = 0;
  1664. uid_t uid;
  1665. char *queuename;
  1666. char queue[128];
  1667. char buff [128];                            
  1668. X#include "config.h"
  1669. X                            
  1670. X
  1671. main (argc, argv, envp)
  1672. int argc;
  1673. char *argv[], *envp[];
  1674. X{
  1675. X    int c;
  1676. X    extern char *optarg;
  1677. X    extern int optind;
  1678. X    while ((c = getopt (argc, argv, "kv")) != -1)
  1679. X    switch (c)
  1680. X    {
  1681. X        case 'k':   kflag = 1;
  1682. X                    break;
  1683. X        case 'v':   q_version();
  1684. X    case '?':   qb_term (-1);
  1685. X    }
  1686. X    if (optind >= argc)
  1687. X    {
  1688. X        fprintf (stderr, "Usage: jr [-k]  qname\n");
  1689. X        exit (-1);
  1690. X    }
  1691. X    queuename = argv[optind];
  1692. X    strcpy (queue, QUEUEPATH);
  1693. X    strcat (queue, queuename);
  1694. X    qb_setterm();
  1695. X    fpq = open (queue, O_RDWR);
  1696. X    if (fpq == -1)
  1697. X    {
  1698. X        fprintf (stderr, "Invalid queue name: %s\n", queuename);
  1699. X        qb_term (-1); 
  1700. X    }
  1701. X    q_lock(fpq);
  1702. X    read  (fpq, &head, sizeof(head));
  1703. X    if (bad_queue()) qb_exit(-1);
  1704. X    read  (fpq, &entry, sizeof(entry));
  1705. X    uid = geteuid();
  1706. X    if (uid != 0 && uid != entry.qe_uid)
  1707. X    {
  1708. X        fprintf (stderr, "Must own the job or be super user to repeat or kill\n");
  1709. X        qb_term (-1);
  1710. X    }
  1711. X    if ((head.qh_flags&qh_repeat) == 0) 
  1712. X    {
  1713. X        head.qh_flags += qh_repeat;
  1714. X    }
  1715. X    if (kflag)
  1716. X    {
  1717. X        if ((head.qh_flags&qh_kill) == 0) 
  1718. X        {
  1719. X            head.qh_flags += qh_kill;
  1720. X        }
  1721. X    }
  1722. X    lseek (fpq, 0, SEEK_SET);
  1723. X    write (fpq, &head, sizeof(head));
  1724. X    q_unlock(fpq);
  1725. X    close(fpq); fpq = 0;
  1726. X    tell_qp();
  1727. X    qb_term(0);
  1728. X}
  1729. END_OF_FILE
  1730. if test 2269 -ne `wc -c <'src/jr.c'`; then
  1731.     echo shar: \"'src/jr.c'\" unpacked with wrong size!
  1732. fi
  1733. # end of 'src/jr.c'
  1734. fi
  1735. if test -f 'src/patchlevel.h' -a "${1}" != "-c" ; then 
  1736.   echo shar: Will not clobber existing file \"'src/patchlevel.h'\"
  1737. else
  1738. echo shar: Extracting \"'src/patchlevel.h'\" \(21 characters\)
  1739. sed "s/^X//" >'src/patchlevel.h' <<'END_OF_FILE'
  1740. X#define PATCHLEVEL 0
  1741. END_OF_FILE
  1742. if test 21 -ne `wc -c <'src/patchlevel.h'`; then
  1743.     echo shar: \"'src/patchlevel.h'\" unpacked with wrong size!
  1744. fi
  1745. # end of 'src/patchlevel.h'
  1746. fi
  1747. if test -f 'src/qagen' -a "${1}" != "-c" ; then 
  1748.   echo shar: Will not clobber existing file \"'src/qagen'\"
  1749. else
  1750. echo shar: Extracting \"'src/qagen'\" \(275 characters\)
  1751. sed "s/^X//" >'src/qagen' <<'END_OF_FILE'
  1752. cat >qa <<EOFqa
  1753. X#!$1
  1754. PATH=$PATH:$2
  1755. export PATH
  1756. cd $3
  1757. echo "Queues available to \`logname\`"
  1758. echo ""
  1759. echo "Queue      No.       Priority      Fixed   Enabled Halted  Stopped"
  1760. echo "Name     Entries      (nice)      Context\n"
  1761. for i in *
  1762. do
  1763. X    qt -l \$i
  1764. done
  1765. exit 0
  1766. XEOFqa
  1767. exit 0
  1768. END_OF_FILE
  1769. if test 275 -ne `wc -c <'src/qagen'`; then
  1770.     echo shar: \"'src/qagen'\" unpacked with wrong size!
  1771. fi
  1772. chmod +x 'src/qagen'
  1773. # end of 'src/qagen'
  1774. fi
  1775. if test -f 'src/qd.c' -a "${1}" != "-c" ; then 
  1776.   echo shar: Will not clobber existing file \"'src/qd.c'\"
  1777. else
  1778. echo shar: Extracting \"'src/qd.c'\" \(1975 characters\)
  1779. sed "s/^X//" >'src/qd.c' <<'END_OF_FILE'
  1780. X/************************************************************************/  
  1781. X/*                                                                      */
  1782. X/* qd .. Queue disable. Prevent jobs being submitted to this queue.     */
  1783. X/*                                                                      */
  1784. X/*      usage: qd  qname                                      */
  1785. X/*                                                                      */
  1786. X/*   Copyright (c) Vita Services 1990                                   */
  1787. X/*             (c) Vita Fibres   1990 1991                              */
  1788. X/*                                                                      */
  1789. X/************************************************************************/
  1790. X
  1791. X#include "qbatch.h"
  1792. int fpq = 0;
  1793. int pid;
  1794. char *queuename;
  1795. char queue[128];
  1796. char buff [128];                            
  1797. X#include "config.h"
  1798. X                            
  1799. main (argc, argv, envp)
  1800. int argc;
  1801. char *argv[], *envp[];
  1802. X{
  1803. X    if (getuid() != 0)
  1804. X    {
  1805. X        fprintf (stderr, "Must be root to disable a queue\n");
  1806. X        exit (-1);
  1807. X    }
  1808. X    if (argc == 1)
  1809. X    {
  1810. X        puts ("Usage qd queuename");
  1811. X        qb_term (0);
  1812. X    }
  1813. X    if (strcmp(argv[1], "-v") == 0) q_version();
  1814. X    queuename = argv[1];
  1815. X    strcpy (queue, QUEUEPATH);
  1816. X    strcat (queue, queuename);
  1817. X    qb_setterm();
  1818. X    fpq = open (queue, O_RDWR);
  1819. X    if (fpq == -1)
  1820. X    {
  1821. X        fprintf (stderr, "Invalid queue name: %s\n", queuename);
  1822. X        qb_term (-1); 
  1823. X    }
  1824. X    pid = getuid();
  1825. X    if (pid != 0)
  1826. X    {
  1827. X        fprintf (stderr, "Must be  super user to disable a queue\n");
  1828. X        qb_term (-1);
  1829. X    }
  1830. X    q_lock(fpq);
  1831. X    read  (fpq, &head, sizeof(head));
  1832. X    if (bad_queue()) qb_exit(-1);
  1833. X    if ((head.qh_flags&qh_enabled) != 0) 
  1834. X    {
  1835. X        head.qh_flags -= qh_enabled;
  1836. X    }
  1837. X    else
  1838. X    {
  1839. X        fprintf (stderr, "Queue %s is already disabled\n", queuename);
  1840. X        qb_term (-1);
  1841. X    }
  1842. X    lseek (fpq, 0, SEEK_SET);
  1843. X    write (fpq, &head, sizeof(head));
  1844. X    qb_term(0);
  1845. X}
  1846. END_OF_FILE
  1847. if test 1975 -ne `wc -c <'src/qd.c'`; then
  1848.     echo shar: \"'src/qd.c'\" unpacked with wrong size!
  1849. fi
  1850. # end of 'src/qd.c'
  1851. fi
  1852. if test -f 'src/qe.c' -a "${1}" != "-c" ; then 
  1853.   echo shar: Will not clobber existing file \"'src/qe.c'\"
  1854. else
  1855. echo shar: Extracting \"'src/qe.c'\" \(2020 characters\)
  1856. sed "s/^X//" >'src/qe.c' <<'END_OF_FILE'
  1857. X/************************************************************************/  
  1858. X/*                                                                      */
  1859. X/* qe .. Queue enable. Enable jobs to be submitted to this queue.       */
  1860. X/*                                                                      */
  1861. X/*      usage: qe  qname                                      */
  1862. X/*                                                                      */
  1863. X/*   Copyright (c) Vita Services 1990                                   */
  1864. X/*             (c) Vita Fibres   1990 1991                              */
  1865. X/*                                                                      */
  1866. X/************************************************************************/
  1867. X
  1868. X#include "qbatch.h"
  1869. int fpq = 0;
  1870. uid_t uid;
  1871. char *queuename;
  1872. char queue[128];
  1873. char buff [128];                            
  1874. X#include "config.h"
  1875. X                            
  1876. X
  1877. main (argc, argv, envp)
  1878. int argc;
  1879. char *argv[], *envp[];
  1880. X{
  1881. X    if (getuid() != 0)
  1882. X    {
  1883. X        fprintf (stderr, "Must be root to enable a queue\n");
  1884. X        exit (-1);
  1885. X    }
  1886. X    if (argc == 1)
  1887. X    {
  1888. X        puts ("Usage qe queuename");
  1889. X        qb_term (0);
  1890. X    }
  1891. X    if (strcmp(argv[1], "-v") == 0) q_version();
  1892. X    queuename = argv[1];
  1893. X    strcpy (queue, QUEUEPATH);
  1894. X    strcat (queue, queuename);
  1895. X    qb_setterm();
  1896. X    fpq = open (queue, O_RDWR);
  1897. X    if (fpq == -1)
  1898. X    {
  1899. X        fprintf (stderr, "Invalid queue name: %s\n", queuename);
  1900. X        qb_term (-1); 
  1901. X    }
  1902. X    uid = getuid();
  1903. X    if (uid != 0)
  1904. X    {
  1905. X        fprintf (stderr, "Must be  super user to disable a queue\n");
  1906. X        qb_term (-1);
  1907. X    }
  1908. X    q_lock(fpq);
  1909. X    read  (fpq, &head, sizeof(head));
  1910. X    if (bad_queue()) qb_exit(-1);
  1911. X    if ((head.qh_flags&qh_enabled) == 0) 
  1912. X    {
  1913. X        head.qh_flags += qh_enabled;
  1914. X    }
  1915. X    else
  1916. X    {
  1917. X        fprintf (stderr, "Queue %s is already enabled\n", queuename);
  1918. X        qb_term (-1);
  1919. X    }
  1920. X    lseek (fpq, 0, SEEK_SET);
  1921. X    write (fpq, &head, sizeof(head));
  1922. X    q_unlock(fpq);
  1923. X    close(fpq); fpq = 0;
  1924. X    qb_term(0);
  1925. X}
  1926. END_OF_FILE
  1927. if test 2020 -ne `wc -c <'src/qe.c'`; then
  1928.     echo shar: \"'src/qe.c'\" unpacked with wrong size!
  1929. fi
  1930. # end of 'src/qe.c'
  1931. fi
  1932. if test -f 'src/qg.c' -a "${1}" != "-c" ; then 
  1933.   echo shar: Will not clobber existing file \"'src/qg.c'\"
  1934. else
  1935. echo shar: Extracting \"'src/qg.c'\" \(1918 characters\)
  1936. sed "s/^X//" >'src/qg.c' <<'END_OF_FILE'
  1937. X/************************************************************************/
  1938. X/*                                                                      */
  1939. X/* qg .. Queue go. resume processing of current job in this queue.      */
  1940. X/*                                                                      */
  1941. X/*      usage: qg  qname                                      */
  1942. X/*                                                                      */
  1943. X/*   Copyright (c) Vita Services 1990                                   */
  1944. X/*             (c) Vita Fibres   1990 1991                              */
  1945. X/*                                                                      */
  1946. X/************************************************************************/
  1947. X
  1948. X#include "qbatch.h"
  1949. int fpq = 0;
  1950. uid_t uid;
  1951. char *queuename;
  1952. char queue[128];
  1953. char buff[128];
  1954. X#include "config.h"
  1955. X
  1956. X
  1957. main (argc, argv, envp)
  1958. int argc;
  1959. char *argv[],
  1960. X   *envp[];
  1961. X{
  1962. X    if (argc == 1)
  1963. X    {
  1964. X    puts ("Usage qg queuename");
  1965. X    qb_term (0);
  1966. X    }
  1967. X    if (strcmp(argv[1], "-v") == 0) q_version();
  1968. X    queuename = argv[1];
  1969. X    strcpy (queue, QUEUEPATH);
  1970. X    strcat (queue, queuename);
  1971. X    qb_setterm();
  1972. X    fpq = open (queue, O_RDWR);
  1973. X    if (fpq == -1)
  1974. X    {
  1975. X    fprintf (stderr, "Invalid queue name: %s\n", queuename);
  1976. X    qb_term (-1);
  1977. X    }
  1978. X    uid = getuid ();
  1979. X    if (uid != 0)
  1980. X    {
  1981. X    fprintf (stderr, "Must be  super user to resume a queue\n");
  1982. X    qb_term (-1);
  1983. X    }
  1984. X    q_lock(fpq);
  1985. X    read (fpq, &head, sizeof (head));
  1986. X    if (bad_queue()) qb_exit(-1);
  1987. X    if (head.qh_pid == 0)
  1988. X    {
  1989. X    fprintf (stderr, "Queue %s is idle\n", queuename);
  1990. X    qb_term (-1);
  1991. X    }
  1992. X    if ((head.qh_flags & qh_halt) != 0)
  1993. X    {
  1994. X    head.qh_flags -= qh_halt;
  1995. X    }
  1996. X    else
  1997. X    {
  1998. X    fprintf (stderr, "Queue %s is not halted\n", queuename);
  1999. X    qb_term (-1);
  2000. X    }
  2001. X    lseek (fpq, 0, SEEK_SET);
  2002. X    write (fpq, &head, sizeof(head));
  2003. X    q_unlock(fpq);
  2004. X    close (fpq);
  2005. X    fpq = 0;
  2006. X    tell_qp();
  2007. X    exit (0);
  2008. X}
  2009. END_OF_FILE
  2010. if test 1918 -ne `wc -c <'src/qg.c'`; then
  2011.     echo shar: \"'src/qg.c'\" unpacked with wrong size!
  2012. fi
  2013. # end of 'src/qg.c'
  2014. fi
  2015. if test -f 'src/qh.c' -a "${1}" != "-c" ; then 
  2016.   echo shar: Will not clobber existing file \"'src/qh.c'\"
  2017. else
  2018. echo shar: Extracting \"'src/qh.c'\" \(1920 characters\)
  2019. sed "s/^X//" >'src/qh.c' <<'END_OF_FILE'
  2020. X/************************************************************************/
  2021. X/*                                                                      */
  2022. X/* qh .. Queue halt. suspend processing of current job in this queue.   */
  2023. X/*                                                                      */
  2024. X/*      usage: qh  qname                                      */
  2025. X/*                                                                      */
  2026. X/*   Copyright (c) Vita Services 1990                                   */
  2027. X/*             (c) Vita Fibres   1990 1991                              */
  2028. X/*                                                                      */
  2029. X/************************************************************************/
  2030. X
  2031. X#include "qbatch.h"
  2032. int fpq = 0;
  2033. uid_t uid;
  2034. char *queuename;
  2035. char queue[128];
  2036. char buff[128];
  2037. X#include "config.h"
  2038. X
  2039. X
  2040. main (argc, argv, envp)
  2041. int argc;
  2042. char *argv[],
  2043. X   *envp[];
  2044. X{
  2045. X    if (argc == 1)
  2046. X    {
  2047. X    puts ("Usage qh queuename");
  2048. X    qb_term (0);
  2049. X    }
  2050. X    if (strcmp(argv[1], "-v") == 0) q_version();
  2051. X    queuename = argv[1];
  2052. X    strcpy (queue, QUEUEPATH);
  2053. X    strcat (queue, queuename);
  2054. X    qb_setterm();
  2055. X    fpq = open (queue, O_RDWR);
  2056. X    if (fpq == -1)
  2057. X    {
  2058. X    fprintf (stderr, "Invalid queue name: %s\n", queuename);
  2059. X    qb_term (-1);
  2060. X    }
  2061. X    uid = getuid ();
  2062. X    if (uid != 0)
  2063. X    {
  2064. X    fprintf (stderr, "Must be  super user to halt a queue\n");
  2065. X    qb_term (-1);
  2066. X    }
  2067. X    q_lock(fpq);
  2068. X    read (fpq, &head, sizeof (head));
  2069. X    if (bad_queue()) qb_exit(-1);
  2070. X    if (head.qh_pid == 0)
  2071. X    {
  2072. X    fprintf (stderr, "Queue %s is idle\n", queuename);
  2073. X    qb_term (-1);
  2074. X    }
  2075. X    if ((head.qh_flags & qh_halt) == 0)
  2076. X    {
  2077. X    head.qh_flags += qh_halt;
  2078. X    }
  2079. X    else
  2080. X    {
  2081. X    fprintf (stderr, "Queue %s is already halted\n", queuename);
  2082. X    qb_term (-1);
  2083. X    }
  2084. X    lseek (fpq, 0, SEEK_SET);
  2085. X    write (fpq, &head, sizeof(head));
  2086. X    q_unlock(fpq);
  2087. X    close (fpq);
  2088. X    fpq = 0;
  2089. X    tell_qp();
  2090. X    exit (0);
  2091. X}
  2092. END_OF_FILE
  2093. if test 1920 -ne `wc -c <'src/qh.c'`; then
  2094.     echo shar: \"'src/qh.c'\" unpacked with wrong size!
  2095. fi
  2096. # end of 'src/qh.c'
  2097. fi
  2098. if test -f 'src/qw.c' -a "${1}" != "-c" ; then 
  2099.   echo shar: Will not clobber existing file \"'src/qw.c'\"
  2100. else
  2101. echo shar: Extracting \"'src/qw.c'\" \(1521 characters\)
  2102. sed "s/^X//" >'src/qw.c' <<'END_OF_FILE'
  2103. X/************************************************************************/  
  2104. X/*                                                                      */
  2105. X/* qw .. queue wait. wait till queue is idle.                           */
  2106. X/*                                                                      */
  2107. X/*      usage: qw qname                                      */
  2108. X/*                                                                      */
  2109. X/*   Copyright (c) Vita Services 1990                                   */
  2110. X/*             (c) Vita Fibres   1990 1991                              */
  2111. X/*                                                                      */
  2112. X/************************************************************************/
  2113. X
  2114. X#include "qbatch.h"
  2115. int fpq = 0;
  2116. int kflag = 0, rflag = 0;
  2117. char *queuename;
  2118. char queue[128];
  2119. char buff [128];                            
  2120. X#include "config.h"
  2121. X                            
  2122. main (argc, argv, envp)
  2123. int argc;
  2124. char *argv[], *envp[];
  2125. X{
  2126. X
  2127. X    if (argc != 2)
  2128. X    {
  2129. X        fprintf(stderr, "Usage : qw <qname>\n");
  2130. X        exit (-1);
  2131. X    }
  2132. X    if (strcmp (argv[1], "-v") == 0) q_version();
  2133. X    queuename = argv[1];
  2134. X    strcpy (queue, QUEUEPATH);
  2135. X    strcat (queue, queuename);
  2136. X    qb_setterm();
  2137. X    do
  2138. X    {
  2139. X        fpq = open (queue, O_RDWR);
  2140. X        q_lock(fpq);
  2141. X        read  (fpq, &head, sizeof(head));
  2142. X    if (bad_queue()) qb_exit(-1);
  2143. X        q_unlock(fpq);
  2144. X        close (fpq);fpq = 0;
  2145. X        if (head.qh_pid == 0) break;
  2146. X        sleep (30);
  2147. X    }
  2148. X    while (head.qh_pid != 0);
  2149. X
  2150. X    qb_term (0);
  2151. X}
  2152. END_OF_FILE
  2153. if test 1521 -ne `wc -c <'src/qw.c'`; then
  2154.     echo shar: \"'src/qw.c'\" unpacked with wrong size!
  2155. fi
  2156. # end of 'src/qw.c'
  2157. fi
  2158. if test -f 'src/rcgen' -a "${1}" != "-c" ; then 
  2159.   echo shar: Will not clobber existing file \"'src/rcgen'\"
  2160. else
  2161. echo shar: Extracting \"'src/rcgen'\" \(731 characters\)
  2162. sed "s/^X//" >'src/rcgen' <<'END_OF_FILE'
  2163. ech=A`echo -n ""`
  2164. if  [ ${ech:-\c} = "A-n" ]
  2165. then 
  2166. X    n=""
  2167. X    c=\\c
  2168. else 
  2169. X    n=-n
  2170. X    c=""
  2171. fi
  2172. cat >rc.QBATCH <<EOFrc
  2173. X#!$1
  2174. PATH=$PATH:$2
  2175. export PATH
  2176. pause()
  2177. X{
  2178. X#
  2179. X# pause for n seconds (multiples of 5 seconds) printing '.' every 5
  2180. X#
  2181. X    timer=0
  2182. X    echo $n ".$c"
  2183. X    while [ \$1 -gt \$timer ]
  2184. X    do
  2185. X    sleep 3
  2186. X    echo $n ".$c"
  2187. X    timer=\`expr \$timer + 3\`
  2188. X    done;
  2189. X}
  2190. cd $3
  2191. qt -v
  2192. echo "Starting QBATCH Queues"
  2193. echo " "
  2194. set *
  2195. for i in \$*
  2196. do
  2197. if \`qt -t \$i\`
  2198. then
  2199. X    if [ \`qf -p \$i\` != "0" ]
  2200. X    then
  2201. X    echo $n "queue \$i restarted .. $c"
  2202. X    qp \$i
  2203. X    if [ \`qf -a \$i\` != "0" ]
  2204. X    then
  2205. X        echo $n "waiting for \$i to stabilise ..$c"
  2206. X        pause 20
  2207. X        echo ".. done"
  2208. X        fi
  2209. X    else
  2210. X    echo "queue \$i not started "
  2211. X    fi
  2212. fi
  2213. done
  2214. exit 0
  2215. XEOFrc
  2216. exit 0
  2217. END_OF_FILE
  2218. if test 731 -ne `wc -c <'src/rcgen'`; then
  2219.     echo shar: \"'src/rcgen'\" unpacked with wrong size!
  2220. fi
  2221. chmod +x 'src/rcgen'
  2222. # end of 'src/rcgen'
  2223. fi
  2224. if test -f 'src/what.h' -a "${1}" != "-c" ; then 
  2225.   echo shar: Will not clobber existing file \"'src/what.h'\"
  2226. else
  2227. echo shar: Extracting \"'src/what.h'\" \(72 characters\)
  2228. sed "s/^X//" >'src/what.h' <<'END_OF_FILE'
  2229. static char QbSID[]= "@(#) QBATCH (c)     Version: 2.0 (31 October 1991)";
  2230. END_OF_FILE
  2231. if test 72 -ne `wc -c <'src/what.h'`; then
  2232.     echo shar: \"'src/what.h'\" unpacked with wrong size!
  2233. fi
  2234. # end of 'src/what.h'
  2235. fi
  2236. if test -f 'src/whatgen' -a "${1}" != "-c" ; then 
  2237.   echo shar: Will not clobber existing file \"'src/whatgen'\"
  2238. else
  2239. echo shar: Extracting \"'src/whatgen'\" \(732 characters\)
  2240. sed "s/^X//" >'src/whatgen' <<'END_OF_FILE'
  2241. X#!/bin/sh
  2242. X#************************************************************************#  
  2243. X#*                                                                      *#
  2244. X#* whatgen Create what.h containing the correct patchlevel.             *#
  2245. X#*                                                                      *#
  2246. X#*   Copyright (c) Vita Services 1990                                   *#
  2247. X#*             (c) Vita Fibres   1990 1991                              *#
  2248. X#*                                                                      *#
  2249. X#************************************************************************#
  2250. set `cat patchlevel.h`
  2251. echo  "static char QbSID[]= \042@(#) QBATCH (c) \tVersion: 2.$3 \
  2252. X(31 October 1991)\042;">what.h
  2253. END_OF_FILE
  2254. if test 732 -ne `wc -c <'src/whatgen'`; then
  2255.     echo shar: \"'src/whatgen'\" unpacked with wrong size!
  2256. fi
  2257. chmod +x 'src/whatgen'
  2258. # end of 'src/whatgen'
  2259. fi
  2260. echo shar: End of archive 1 \(of 6\).
  2261. cp /dev/null ark1isdone
  2262. MISSING=""
  2263. for I in 1 2 3 4 5 6 ; do
  2264.     if test ! -f ark${I}isdone ; then
  2265.     MISSING="${MISSING} ${I}"
  2266.     fi
  2267. done
  2268. if test "${MISSING}" = "" ; then
  2269.     echo You have unpacked all 6 archives.
  2270.     rm -f ark[1-9]isdone
  2271. else
  2272.     echo You still need to unpack the following archives:
  2273.     echo "        " ${MISSING}
  2274. fi
  2275. ##  End of shell archive.
  2276. exit 0
  2277.  
  2278. exit 0 # Just in case...
  2279. -- 
  2280. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  2281. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  2282. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  2283. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  2284.